package com.fire.control.system.module.duty.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.fire.control.system.entity.Duty;

/**
 * @author liuxincheng
 * @ClassName: SignRepository
 * @Description: TODO(签到持久层)
 * @date 2017年6月1日 下午3:05:03
 */
@Repository
public interface DutyRepository extends JpaRepository<Duty, String>, JpaSpecificationExecutor<Duty> {
	
	//List<Duty> findDutyListByCondition(String userId, Boolean status, Date startTime, Date endTime);

	@Query("from Duty where status=1 and userId=:userId")
	public List<Duty> getSignList(@Param("userId") String userId);

	//List<Duty> findByUserIdAndDutyDateBetween(String userId, Date parse, Date parse2);

	//List<Duty> findByUserIdAndDutyStatusAndDutyDateBetween(String userId, String dutyStatus, Date parse, Date parse2);

}
